var xmlHttp

function showPostage(str,divName,tagName)
{ 
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
		 alert ("Browser does not support HTTP Request")
		 return
		 } 
	
		var url="required/js/ajax_place.php"
		url=url+"?q="+str+"&tag="+tagName
		xmlHttp.onreadystatechange=stateChangedResult
		xmlHttp.open("GET",url,true)
		xmlHttp.send(null)


		function stateChangedResult() 
		{
			if (xmlHttp.readyState==1) 
			{ 
				document.getElementById(divName).innerHTML="<table><td valign=center width='100%'><img src='images/loading1.gif'></td></table>";
			}
			else if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{ 
				 reStart="";
				 reResult=xmlHttp.responseText;
				 reEnd="";
				 //alert(reResult);
				 //document.getElementById("divResult").innerHTML="";
				 document.getElementById(divName).innerHTML=reStart+reResult+reEnd;
				  
			} 
		}
		
		
		
		function GetXmlHttpObject()
		{
			var xmlHttp=null;
			try
			 {
			 // Firefox, Opera 8.0+, Safari
			 xmlHttp=new XMLHttpRequest();
			 }
			catch (e)
			 {
			 //Internet Explorer
			 try
			  {
			  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			  }
			 catch (e)
			  {
			  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			  }
			 }
			return xmlHttp;
		}
}